package com.wh1200.mybatis.xmlless.config

import com.wh1200.mybatis.xmlless.enums.XmllessDbType
import com.wh1200.xmlless.test.dao.StudentDAO
import com.wh1200.xmlless.test.model.Student
import net.sf.jsqlparser.parser.CCJSqlParserUtil
import org.junit.jupiter.api.Test
import kotlin.reflect.jvm.javaMethod
import kotlin.test.assertNotNull


/**
 *
 * Created by 吴昊 on 2018-12-09.
 *
 * @author 吴昊
 * @since 0.0.1
 */
class StudentDAOPostgreSQLResolverTest : BaseResolverTest(
    StudentDAO::class.java, XmllessDbType.POSTGRE_SQL
) {

  @Test
  fun resolveSaveOrUpdate() {
    val method = StudentDAO::saveOrUpdate.javaMethod!!
    val query = createQueryForMethod(method)
    val sql = query.sql
    assertNotNull(sql)
  }

}
